Signal processing of different bit widths (e.g., 8 bits, 10 bits, 12 bits, etc.) is more and more popular in a variety of applications, including a camera, a video encoder, a video decoder, a display device, a graphics processing unit (GPU), etc. Specifically, a procedure may need to process data samples with different bit widths in different modes or different input sources. For example, the procedure may be configured to process first data samples each having a first bit width (e.g., 12-bit data samples) in a first condition, and may be configured to process second data samples each having a second bit width (e.g., 8-bit data samples) in a second condition.
The procedure may be implemented using a processor with a plurality of registers and a plurality of logic gates. Some registers (e.g., control registers) are independent of different bit widths of data samples, while some registers (e.g., data registers) are related to different bit widths of data samples. Suppose that each data register is a 12-bit register. When the processor is configured to process a 12-bit data sample, all bit cells of the 12-bit register are in use. When the processor is configured to process an 8-bit data sample, all bit cells of the 12-bit register are still in use, which may result in waste of memory access bandwidth, memory size requirement or power consumption.